﻿/* Components/Pages/ReportViewer.razor.css */

/* --- 1. 页面主布局样式 (这部分保持不变) --- */

.report-viewer-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    height: calc(100vh - 56px); /* 假设顶部导航栏高度为56px */
    overflow: hidden;
}

.report-list-pane {
    border-right: 1px solid #dee2e6;
    background-color: #f8f9fa;
    overflow-y: auto;
}

.report-content-pane {
    padding: 2rem;
    overflow-y: auto;
}

.list-group-item-action {
    cursor: pointer;
}


/* --- 2. 移动端响应式布局 (这部分保持不变) --- */

@media (max-width: 991.98px) {
    .report-viewer-container {
        grid-template-columns: 1fr;
        display: block;
        height: auto;
    }

    .report-list-pane {
        display: block;
        height: auto;
        border-right: none;
    }

    .report-content-pane {
        display: none;
    }

    .report-viewer-container.content-visible .report-list-pane {
        display: none;
    }

    .report-viewer-container.content-visible .report-content-pane {
        display: block;
    }
}


/* --- 3. 新增的 Markdown 内容美化样式 --- */

.markdown-body {
    /* 基础字体和行高，增加呼吸感 */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    font-size: 16px;
    line-height: 1.7; /* 关键：增加行高，解决拥挤问题 */
    color: #24292f;
    word-wrap: break-word;
}

    /* 段落间距 */
    .markdown-body p {
        margin-top: 0;
        margin-bottom: 16px; /* 关键：增加段落间的下边距 */
    }

    /* 标题样式 */
    .markdown-body h1,
    .markdown-body h2,
    .markdown-body h3,
    .markdown-body h4,
    .markdown-body h5,
    .markdown-body h6 {
        margin-top: 24px; /* 标题与上方内容的间距 */
        margin-bottom: 16px; /* 标题与下方内容的间距 */
        font-weight: 600;
        line-height: 1.25;
    }

    .markdown-body h1 {
        font-size: 2em;
        padding-bottom: .3em;
        border-bottom: 1px solid #d0d7de;
    }

    .markdown-body h2 {
        font-size: 1.5em;
        padding-bottom: .3em;
        border-bottom: 1px solid #d0d7de;
    }

    .markdown-body h3 {
        font-size: 1.25em;
    }

    /* 列表样式 */
    .markdown-body ul,
    .markdown-body ol {
        margin-top: 0;
        margin-bottom: 16px;
        padding-left: 2em; /* 增加列表的内缩进 */
    }

    .markdown-body li {
        margin-bottom: 0.25em; /* 列表项之间的微小间距 */
    }

    /* 引用块样式 */
    .markdown-body blockquote {
        margin: 0 0 16px 0;
        padding: 0 1em;
        color: #57606a;
        border-left: .25em solid #d0d7de;
    }

    /* 代码块样式 */
    .markdown-body pre {
        background-color: #f6f8fa; /* 使用更柔和的背景色 */
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 6px;
        overflow: auto;
        font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
        font-size: 85%;
        line-height: 1.45;
    }

        .markdown-body pre code {
            padding: 0;
            margin: 0;
            font-size: 100%;
            background-color: transparent;
            border: 0;
        }

    /* 行内代码样式 */
    .markdown-body code {
        padding: .2em .4em;
        margin: 0;
        font-size: 85%;
        background-color: rgba(175,184,193,0.2);
        border-radius: 6px;
        font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
    }

    /* 水平分割线 */
    .markdown-body hr {
        height: .25em;
        padding: 0;
        margin: 24px 0;
        background-color: #d0d7de;
        border: 0;
    }

    /* Mermaid 图表容器居中显示 */
    .markdown-body .mermaid {
        text-align: center;
        margin-top: 16px;
        margin-bottom: 16px;
    }
